<?php
  require_once('../system/dbConn.php'); 
 connect();
 $sql="select *from videotype";
 $rs=mysql_query($sql)or die('查询失败!'.mysql_errno());
 ?>
 <ul class="nav navbar-nav">
 <li><a href="index.php">首页</a></li>
 <?php
 while($row=mysql_fetch_assoc($rs))
 {

 	?>
 	<li><a href="VTList.php?tid=<?php echo $row["tid"];?>
 	<?php
 	echo $row["tid"];
 	?>">
 	<?php
 	echo $row["typename"];
 	?>
 	</a>
 	</li>
 	<?php
 }
 ?>
 </ul>
 </li>
 </ul>
 <form action="search.php" class="navbar-form navbar-left" role="search">
 <div class="form-group">
 <input type="text" class="form-control" name="videoname" placeholder="Search">
 </div>
 <button type="submit" class="btn btn-default">搜索</button>
 </form>
 <ul class="nav navbar-nav navbar-right">
 <li class="active"><a herf="">欢迎<?php
 session_start();
 if(isset($_SESSION["user"]))
 	echo "  ".$_SESSION["user"]."  ";
 else{

 	echo "您";
 }
 ?>访问本网站</a>
 </li>
 <?php
 if(isset($_SESSION["user"]))
 {
 	?>
 	<li><a href="logout.php">注销</a></li>
 	<li class="dropdown">
 	<a href="#"class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expaned="false">个人中心<span class="caret"></span></a>
 	<ul class="dropdown-menu">
 	<li><a href="#" data-toggle="modal" data-target="#changePassword">修改个人密码</a></li>
 	<li><a href="#" data-toggle="modal" data-target="#changeInfor">修改个人信息</a></li>
 	<li><a href="myCommentList.php">我的评价</a></li>
 	</ul>
 	</li>
 	<?php
 }
else{
	?>
	<li><a href="#" data-toggle="modal" data-target="#login">登录</a></li>
	<li><a href="#" data-toggle="modal" data-target="#reg">注册</a></li>
	<?php
}
?>
</ul>

